﻿using DevExpress.XtraTreeList;
using DevExpress.XtraTreeList.Nodes;
using HuaCheng.CommonClass;
using HuaCheng.Controller;
using HuaCheng.DataAccess;
using HuaCheng.Model;
using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace HuaCheng.Views
{
    /// <summary>
    /// 专业通道信息
    /// </summary>
    public partial class ChannelInfoProfess : Form
    {
        //定义单位对象
        public UnitOrder uOrder;
        //从表中读取工步数据
        List<byte[]> byteList;
        //定义测试信息对象
        Test test = new Test();
        //电压量程
        public string volRange;
        //电流量程
        public string curRange;
        ////定义当前通道工步集合
        //List<StepInfo> currentList = new List<StepInfo>();
        //定义工步方案集合
        public Dictionary<int, List<StepInfo>> stepchemeList = new Dictionary<int, List<StepInfo>>();
        //当前页码 默认为0
        public int currentIndex;
        //测试号
        public string testid;
        //设备号
        public string ip;
        //柜号
        public int gid;
        //中位机号
        public int mid;
        //通道号
        public int cid;
        //总页码
        public static int totalIndex;
        public ChannelInfoProfess(string testId,string ip, int gid, int mid,int cid)
        {
            InitializeComponent();
            InitUnit();//初始化单位
            this.testid = testId;
            this.ip = ip;
            this.gid = gid;
            this.cid = cid;
            this.mid = mid;
            InitParams(testId,ip, gid,mid, cid);//初始化获得表的数据源          
            LoadStepInfo(0);//把数据源赋给下面的表控件          
            InitFirstTable(testId,ip, gid,mid, cid,0);//把数据源赋给上面的表控件
        }
        /// <summary>
        /// 当前页属性
        /// </summary>
        public int CurrentIndex
        {
            get { return currentIndex; }
            set { SetBtnEnable(ref currentIndex, value); }
        }
        /// <summary>
        /// 设置页面时监听页码变化 来切换按钮的属性
        /// </summary>
        /// <param name="currentIndex"></param>
        /// <param name="value"></param>
        private void SetBtnEnable(ref int currentIndex, int value)
        {
            currentIndex = value;
            if (currentIndex > 0)
            {
                this.btnFrontSche.Enabled = true;
            }
            else
            {
                this.btnFrontSche.Enabled = false;
            }
            if (currentIndex >= totalIndex - 1)
            {
                this.btnNextSche.Enabled = false;
            }
            else
            {
                this.btnNextSche.Enabled = true;
            }
        }
        /// <summary>
        /// 从配置文件读取单位
        /// </summary>
        public void InitUnit()
        {
            uOrder = UnitOrderControl.GetUnit();
            this.tLStepTime.Caption = ResourceCulture.GetString("StepTime") + "(" + uOrder.StepEditTime + ")";
            this.tLVoltage.Caption = ResourceCulture.GetString("lblVoltageText") + "(" + uOrder.Voltage + ")";
            this.tLCurrent.Caption = ResourceCulture.GetString("lblCurrentText") + "(" + uOrder.Current + ")";
            this.tLCap.Caption = ResourceCulture.GetString("Chg_Cap") + "(" + uOrder.Capacity + ")";
            this.tLEnergy.Caption = ResourceCulture.GetString("Chg_Eng") + "(" + uOrder.Energy + ")";
            this.tLDeltaVolt.Caption = "-ΔV(" + uOrder.Voltage + ")";
            this.tLPower.Caption = ResourceCulture.GetString("Power") + "(" + uOrder.Power + ")";
            this.tLLoadResistor.Caption = ResourceCulture.GetString("Resistance") + "(" + uOrder.Resistance + ")";
            this.tLCutoffCurr.Caption = ResourceCulture.GetString("EndCurrent") + "(" + uOrder.Current + ")";
            this.tLMaxVi.Caption = "MaxVi(" + uOrder.Voltage + ")";
            this.tLMinVi.Caption = "MinVi(" + uOrder.Voltage + ")";
            this.tLMaxTi.Caption = "MaxTi(" + uOrder.Template + ")";
            this.tLMinTi.Caption = "MinTi(" + uOrder.Template + ")";
            this.tLSingleVolt.Caption = ResourceCulture.GetString("SinglecellVoltageStopCondition") + "(" + uOrder.Voltage + ")";
        }
        /// <summary>
        /// 读取工步表中数据和测试表数据
        /// </summary>
        /// <param name="ip"></param>
        /// <param name="gid"></param>
        /// <param name="cid"></param>
        public void InitParams(string testId,string ip, int gid,int mid, int cid)
        {
            try //从表中读取工步数据
            {
                //从工步方案表中查询某通道一次测试中所有工步方案
                byteList = StepSchemeHelper.RetriveStepScheme(testId, ip, gid,mid,cid);
                totalIndex = byteList.Count;//获取当前测试的总页码
                if (byteList.Count > 0)
                {
                    List<StepInfo> currentList = new List<StepInfo>();
                    for (int i = 0; i < byteList.Count; i++)
                    {
                        //反序列化每个工步方案的工步信息
                        List<StepInfo> stepInfo = (List<StepInfo>)SerializableControl.DeserializeWithBinary(byteList[i]);
                        //将工步list转为当前单位的数值
                        currentList = DataControl.DataConvertToCurrent(stepInfo);
                        //添加到工步方案字典中
                        stepchemeList.Add(i, currentList);
                    }
                    if (byteList.Count > 1)//当有超过一个工步方案时
                    {
                        this.btnFrontSche.Visible = true;
                        this.btnNextSche.Visible = true;
                        this.btnNextSche.Enabled = true;
                        this.btnFrontSche.Enabled = false;
                    }
                }
                volRange = DicHelper.RetrieveVolLower() + "-" + DicHelper.RetrieveVolUpper() + uOrder.Voltage;//电压量程
                curRange = DicHelper.RetrieveCurrLower() + "-" + DicHelper.RetrieveCurrUpper() + uOrder.Current;//电流量程
                test = TestHelper.GetTestInfo(testId,ip, gid, mid,cid);//获取测试表中通道信息
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message + e.StackTrace);
            }
        }
        public void InitFirstTable(string testid, string ip, int gid, int mid,int cid, int index)
        {
            this.tLChlInfo.Nodes[0].SetValue(1, "#" + ip + "-" + gid +"-" + mid + "-" + cid);//设备-单元-通道号
            //如果有工步方案，treeList新增一个节点
            if (stepchemeList.Count > 0)
            {
                List<StepInfo> currentList = new List<StepInfo>();
                currentList = stepchemeList[index];//默认显示第一个工步方案
                string startnum = Convert.ToString(test.StartStepNum);
                //起始时间
                string starttime = Convert.ToString(test.StartTime);
                //创建者
                string creator = test.Creator;
                //备注
                string txtRemark = test.Note;
                this.tLChlInfo.Nodes[1].SetValue(1, starttime);//电压上限
                this.tLChlInfo.Nodes[2].SetValue(1, startnum);//起始工步
                this.tLChlInfo.Nodes[7].SetValue(1, volRange);//电压量程
                this.tLChlInfo.Nodes[7].SetValue(3, creator);//创建者
                this.tLChlInfo.Nodes[8].SetValue(3, txtRemark);//备注
                this.tLChlInfo.Nodes[8].SetValue(1, curRange);//电流量程
            }
        }
        /// <summary>
        /// 根据工步表初始化工步内容
        /// </summary>
        private void LoadStepInfo(int index)
        {
            //工步集合
            List<StepInfo> currentList = new List<StepInfo>();
            //如果有工步方案，treeList新增一个节点
            if (stepchemeList.Count > 0)
            {
                currentList = stepchemeList[index];//默认显示第一个工步方案
                if (currentList.Count > 0)//有工步信息才赋值
                {
                    tLStepEditor = StepControl.SetTreeListByStepList(currentList, tLStepEditor);//把该通道工步表中的信息单位化以后显示在tLStepEditor
                }
                //如果第一个工步有保护条件则显示
                ProtectSelect protSel = new ProtectSelect();
                ProtectCondition protCon = new ProtectCondition();
                if (tLStepEditor.Nodes[0]["ProtSelect"] != null)
                {
                    protSel = JsonHelper.Deserialize<ProtectSelect>(tLStepEditor.Nodes[0]["ProtSelect"].ToString());
                }
                if (tLStepEditor.Nodes[0]["ProtCondition"] != null)
                {
                    protCon = JsonHelper.Deserialize<ProtectCondition>(tLStepEditor.Nodes[0]["ProtCondition"].ToString());
                }
                SetProctParameter(protSel, protCon);
            }
            if (currentList.Count < 10)//如果不足10行则补上空行
            {
                for (int i = 0; i < 10 - byteList.Count; i++)
                {
                    TreeListNode tmpNode = tLStepEditor.Nodes.Add();
                    tLStepEditor.FocusedNode = tmpNode;
                }
            }
            tLStepEditor.FocusedNode = tLStepEditor.Nodes[0];//聚焦到第一行
        }
        /// <summary>
        /// 点击某一个专业工步显示对应的保护条件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void tLStepEditor_MouseDown(object sender, MouseEventArgs e)
        {
            //显示值
            TreeListHitInfo hInfo = tLStepEditor.CalcHitInfo(new System.Drawing.Point(e.X, e.Y));
            if (hInfo.HitInfoType == DevExpress.XtraTreeList.HitInfoType.Cell)
            {
                if (hInfo.Node != null)
                {
                    TreeListNode currNode = new TreeListNode();
                    if (hInfo.Node.Level == 0)
                    {
                        currNode = hInfo.Node;
                    }
                    else
                    {
                        currNode = hInfo.Node.ParentNode;
                    }
                    ProtectSelect protSel = new ProtectSelect();
                    ProtectCondition protCon = new ProtectCondition();
                    if (currNode["ProtSelect"] != null)
                    {
                        protSel = JsonHelper.Deserialize<ProtectSelect>(currNode["ProtSelect"].ToString());
                    }
                    if (currNode["ProtCondition"] != null)
                    {
                        protCon = JsonHelper.Deserialize<ProtectCondition>(currNode["ProtCondition"].ToString());
                    }
                    SetProctParameter(protSel, protCon);
                    gbxProtect.Text = Convert.ToString(currNode.Id + 1) + ResourceCulture.GetString("haoStep") + "：" + Convert.ToString(currNode["StepName"]);
                }
                else
                {
                    gbxProtect.Text = ResourceCulture.GetString("ProtectCondition");
                    ClearProParameter();
                }
            }
        }
        /// <summary>
        /// 显示点击工步所对应的保护条件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void tLStepEditor_MouseUp(object sender, MouseEventArgs e)
        {
            //切换工步时显示相应保护条件
            if (tLStepEditor.FocusedNode != null)
            {
                if (tLStepEditor.FocusedNode["StepName"] != null)
                {
                    //此次编辑的工步号
                    TreeListNode currNode = new TreeListNode();
                    if (tLStepEditor.FocusedNode.Level == 0)
                    {
                        currNode = tLStepEditor.FocusedNode;
                    }
                    else
                    {
                        currNode = tLStepEditor.FocusedNode.ParentNode;
                    }
                    ProtectSelect protSel = new ProtectSelect();
                    ProtectCondition protCon = new ProtectCondition();
                    if (currNode["ProtSelect"] != null)
                    {
                        protSel = JsonHelper.Deserialize<ProtectSelect>(currNode["ProtSelect"].ToString());
                    }
                    if (currNode["ProtCondition"] != null)
                    {
                        protCon = JsonHelper.Deserialize<ProtectCondition>(currNode["ProtCondition"].ToString());
                    }
                    SetProctParameter(protSel, protCon);
                    gbxProtect.Text = Convert.ToString(currNode.Id + 1) + ResourceCulture.GetString("haoStep") + "：" + Convert.ToString(currNode["StepName"]);
                }
            }
            else
            {
                gbxProtect.Text = ResourceCulture.GetString("ProtectCondition");
                ClearProParameter();
            }
        }
        /// <summary>
        /// 清除保护条件显示
        /// </summary>
        private void ClearProParameter()
        {
            foreach (Control gbControl in gbxProtect.Controls)
            {
                if (gbControl is GroupBox)
                {
                    //化成保护条件groupbox
                    if (gbControl.Name == "gbHuaChengProtect")
                    {
                        chkVoltageChangeRate.Checked = false;
                        txtDetectionTime.Text = "";
                        txtVoltageValue.Text = "";
                    }
                    else
                    {
                        //遍历除化成保护条件之外的groupbox中的checkbox
                        foreach (Control chkControl in gbControl.Controls)
                        {
                            if (chkControl is CheckBox)
                            {
                                CheckBox chkIndividual = (CheckBox)gbControl.Controls[chkControl.Name];
                                string txtIndividualName = "txt" + chkIndividual.Name.Substring(3);
                                TextBox txtIndividual = (TextBox)gbControl.Controls[txtIndividualName];
                                chkIndividual.Checked = false;
                                txtIndividual.Text = "";
                            }
                        }
                    }
                }
            }
            //活性物质
            chkActiveSubstance.Checked = false;
            txtActiveSubstance.Text = "";
        }
        /// <summary>
        /// 保护条件值显示
        /// </summary>
        /// <param name="protSel"></param>
        /// <param name="protCon"></param>
        private void SetProctParameter(ProtectSelect protSel, ProtectCondition protCon)
        {
            //时间间隔
            if (protSel.SelTimeSpan == true)
            {
                chkTimeSpan.Checked = true;
                txtTimeSpan.Text = protCon.TimeSpan;
            }
            else
            {
                chkTimeSpan.Checked = false;
                txtTimeSpan.Text = "";
            }
            //电压间隔
            if (protSel.SelVolSpan == true)
            {
                chkVoltageSpan.Checked = true;
                txtVoltageSpan.Text = protCon.VoltageSpan;
            }
            else
            {
                chkVoltageSpan.Checked = false;
                txtVoltageSpan.Text = "";
            }
            //电流间隔
            if (protSel.SelCurrSpan == true)
            {
                chkCurrentSpan.Checked = true;
                txtCurrentSpan.Text = protCon.CurrentSpan;
            }
            else
            {
                chkCurrentSpan.Checked = false;
                txtCurrentSpan.Text = "";
            }
            //工步延时
            if (protSel.SelStepDelay == true)
            {
                chkStepDelay.Checked = true;
                txtStepDelay.Text = protCon.StepDelay;
            }
            else
            {
                chkStepDelay.Checked = false;
                txtStepDelay.Text = "";
            }
            //接续延时
            if (protSel.SelConDelay == true)
            {
                chkContinueDelay.Checked = true;
                txtContinueDelay.Text = protCon.ContinueDelay;
            }
            else
            {
                chkContinueDelay.Checked = false;
                txtContinueDelay.Text = "";
            }
            //化成保护条件
            if (protSel.SelVolRate == true)
            {
                chkVoltageChangeRate.Checked = true;
                txtDetectionTime.Text = protCon.DetectionTime;
                txtVoltageValue.Text = protCon.VoltageValue;
            }
            else
            {
                chkVoltageChangeRate.Checked = false;
                txtDetectionTime.Text = "";
                txtVoltageValue.Text = "";
            }
            //电压下限
            if (protSel.SelVolMin == true)
            {
                chkVoltageMin.Checked = true;
                txtVoltageMin.Text = protCon.VoltageMin;
            }
            else
            {
                chkVoltageMin.Checked = false;
                txtVoltageMin.Text = "";
            }
            //电压上限
            if (protSel.SelVolMax == true)
            {
                chkVoltageMax.Checked = true;
                txtVoltageMax.Text = protCon.VoltageMax;
            }
            else
            {
                chkVoltageMax.Checked = false;
                txtVoltageMax.Text = "";
            }
            //电流下限
            if (protSel.SelCurrMin == true)
            {
                chkCurrentMin.Checked = true;
                txtCurrentMin.Text = protCon.CurrentMin;
            }
            else
            {
                chkCurrentMin.Checked = false;
                txtCurrentMin.Text = "";
            }
            //电流上限
            if (protSel.SelCurrMax == true)
            {
                chkCurrentMax.Checked = true;
                txtCurrentMax.Text = protCon.CurrentMax;
            }
            else
            {
                chkCurrentMax.Checked = false;
                txtCurrentMax.Text = "";
            }
            //温度上限
            if (protSel.SelTempeMax == true)
            {
                chkTMax.Checked = true;
                txtTMax.Text = protCon.TemperatureMax;
            }
            else
            {
                chkTMax.Checked = false;
                txtTMax.Text = "";
            }
            //平台电压1
            if (protSel.SelPlatform1 == true)
            {
                chkPlatForm1.Checked = true;
                txtPlatForm1.Text = protCon.Platform1;
            }
            else
            {
                chkPlatForm1.Checked = false;
                txtPlatForm1.Text = "";
            }
            //平台电压2
            if (protSel.SelPlatform2 == true)
            {
                chkPlatForm2.Checked = true;
                txtPlatForm2.Text = protCon.Platform2;
            }
            else
            {
                chkPlatForm2.Checked = false;
                txtPlatForm2.Text = "";
            }
            //平台电压3
            if (protSel.SelPlatform3 == true)
            {
                chkPlatForm3.Checked = true;
                txtPlatForm3.Text = protCon.Platform3;
            }
            else
            {
                chkPlatForm3.Checked = false;
                txtPlatForm3.Text = "";
            }
            //客户电流上下限
            if (protSel.SelCustCurr == true)
            {
                chkCusCur.Checked = true;
                txtCustmCurrMin.Text = protCon.CustomerCurrMin;
                txtCustmCurrMax.Text = protCon.CustomerCurrMax;
            }
            else
            {
                chkCusCur.Checked = false;
                txtCustmCurrMin.Text = "";
                txtCustmCurrMax.Text = "";
            }
            //活性物质
            if (protSel.SelActivities == true)
            {
                chkActiveSubstance.Checked = true;
                txtActiveSubstance.Text = protCon.Activities;
            }
            else
            {
                chkActiveSubstance.Checked = false;
                txtActiveSubstance.Text = "";
            }
        }
        /// <summary>
        /// 上一套工步
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnFrontSche_Click(object sender, EventArgs e)
        {
            CurrentIndex--;
            //更新第一张表
            InitFirstTable(testid, ip, gid, mid,cid, currentIndex);
            //更新第二张表
            LoadStepInfo(currentIndex);
        }
        /// <summary>
        /// 下一套工步
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnNextSche_Click(object sender, EventArgs e)
        {
            CurrentIndex++;
            //更新第一张表
            InitFirstTable(testid, ip, gid, mid,cid, currentIndex);
            //更新第二张表
            LoadStepInfo(currentIndex);
        }
        #region 国际化
        private void ChannelInfoProfess_Load(object sender, EventArgs e)
        {
            ResourceCulture.SetCurrentCulture(IndexPage.language);
            this.SetResourceCulture();
        }
        /// <summary>
        /// 为当前页面内所有控件设置文本语种
        /// </summary>
        private void SetResourceCulture()
        {
            this.Text = ResourceCulture.GetString("ChannelInfo");
            this.tLColChlPropFir.Caption = ResourceCulture.GetString("ChannelProperty");
            this.tLColValFir.Caption = ResourceCulture.GetString("ChannelValue");
            this.tLColChlPropSec.Caption = ResourceCulture.GetString("ChannelProperty");
            this.tLColValSec.Caption = ResourceCulture.GetString("ChannelValue");
            this.tLColChlPropThr.Caption = ResourceCulture.GetString("ChannelProperty");
            this.tLColValThr.Caption = ResourceCulture.GetString("ChannelValue");
            this.tLChlInfo.Nodes[0].SetValue(0, ResourceCulture.GetString("DevUnitChl"));//设备_单元_通道号
            this.tLChlInfo.Nodes[0].SetValue(2, ResourceCulture.GetString("VolMinText"));//电压下限
            this.tLChlInfo.Nodes[0].SetValue(4, ResourceCulture.GetString("Delayprotectiontime"));//延时时间
            this.tLChlInfo.Nodes[1].SetValue(0, ResourceCulture.GetString("StartTime"));//启动时间
            this.tLChlInfo.Nodes[1].SetValue(2, ResourceCulture.GetString("VolMaxText"));//电压上限
            this.tLChlInfo.Nodes[1].SetValue(4, ResourceCulture.GetString("StepDelay"));//工步延时
            this.tLChlInfo.Nodes[2].SetValue(0, ResourceCulture.GetString("StartStepText"));//起始工步
            this.tLChlInfo.Nodes[2].SetValue(2, ResourceCulture.GetString("CurrMinText"));//电流下限
            this.tLChlInfo.Nodes[2].SetValue(4, ResourceCulture.GetString("ContinueDelay"));//接续延时
            this.tLChlInfo.Nodes[3].SetValue(0, ResourceCulture.GetString("StepTime"));//工步时间
            this.tLChlInfo.Nodes[3].SetValue(2, ResourceCulture.GetString("CurrMaxText"));//电流上限
            this.tLChlInfo.Nodes[3].SetValue(4, ResourceCulture.GetString("ZWJXWJInfo"));//中位机和下位机信息
            this.tLChlInfo.Nodes[4].SetValue(0, ResourceCulture.GetString("StepCap"));//工步容量
            this.tLChlInfo.Nodes[4].SetValue(2, ResourceCulture.GetString("Temp.Upper"));//温度上限
            this.tLChlInfo.Nodes[4].SetValue(4, ResourceCulture.GetString("ServerVersion"));//服务器版本
            this.tLChlInfo.Nodes[5].SetValue(0, ResourceCulture.GetString("xunhuan"));//循环
            this.tLChlInfo.Nodes[5].SetValue(2, ResourceCulture.GetString("PN"));//电池批号
            this.tLChlInfo.Nodes[5].SetValue(4, ResourceCulture.GetString("ClientVersion"));//客户端版本
            this.tLChlInfo.Nodes[6].SetValue(0, ResourceCulture.GetString("RecordConditionText"));//记录条件
            this.tLChlInfo.Nodes[6].SetValue(2, ResourceCulture.GetString("BarcodeText"));//电池条码
            this.tLChlInfo.Nodes[6].SetValue(4, ResourceCulture.GetString("ZWJversion"));//中位机版本
            this.tLChlInfo.Nodes[7].SetValue(0, ResourceCulture.GetString("VoltageMeasuringrange"));//电压量程
            this.tLChlInfo.Nodes[7].SetValue(2, ResourceCulture.GetString("Creator"));//创建者
            this.tLChlInfo.Nodes[7].SetValue(4, ResourceCulture.GetString("SerialnumberoftheZWJ"));//中位机序列号
            this.tLChlInfo.Nodes[8].SetValue(0, ResourceCulture.GetString("CurrentMeasuringrange"));//电流量程
            this.tLChlInfo.Nodes[8].SetValue(2, ResourceCulture.GetString("Remarks"));//备注
            this.tLChlInfo.Nodes[8].SetValue(4, ResourceCulture.GetString("XWJVersionofthemainentrance"));//主通道下位机版本
            this.tLChlInfo.Nodes[9].SetValue(0, ResourceCulture.GetString("StepFile"));//工步文件
            this.tLChlInfo.Nodes[9].SetValue(2, ResourceCulture.GetString("PlatVolt") + "1");//平台电压1
            this.tLChlInfo.Nodes[10].SetValue(0, ResourceCulture.GetString("Channelvalidity"));//通道有效性
            this.tLChlInfo.Nodes[10].SetValue(2, ResourceCulture.GetString("PlatVolt") + "2");//平台电压2
            this.tLChlInfo.Nodes[11].SetValue(0, ResourceCulture.GetString("FormationName"));//化成名称
            this.tLChlInfo.Nodes[11].SetValue(2, ResourceCulture.GetString("PlatVolt") + "3");//平台电压3
            this.tLChlInfo.Nodes[12].SetValue(0, ResourceCulture.GetString("Ratechangeaboutformationvoltage"));//化成电压变化率
            this.tLChlInfo.Nodes[12].SetValue(2, ResourceCulture.GetString("Material"));//活性物质
            this.tLStepNum.Caption = ResourceCulture.GetString("StepID");
            this.tLStepName.Caption = ResourceCulture.GetString("StepName");
            this.tLBeginValue.Caption = ResourceCulture.GetString("StartValue");
            this.tLSlope.Caption = ResourceCulture.GetString("Slope");
            this.tLEndValue.Caption = ResourceCulture.GetString("EndValue");
            this.tLAmplitude1.Caption = ResourceCulture.GetString("Amplitude") + "1";
            this.tLTime1.Caption = ResourceCulture.GetString("Time") + "1";
            this.tLAmplitude2.Caption = ResourceCulture.GetString("Amplitude") + "2";
            this.tLTime2.Caption = ResourceCulture.GetString("Time") + "2";
            this.btnFrontSche.Text = ResourceCulture.GetString("AdvanceProtectParameter");
            this.btnNextSche.Text = ResourceCulture.GetString("NextProtectParameter");
            this.lblBeginStep.Text = ResourceCulture.GetString("StartStepText");
            this.gbRecordCondition.Text = ResourceCulture.GetString("RecordConditionText");
            this.chkTimeSpan.Text = ResourceCulture.GetString("TimeSpanText");
            this.chkVoltageSpan.Text = ResourceCulture.GetString("VolSpanText");
            this.chkCurrentSpan.Text = ResourceCulture.GetString("CurrSpanText");
            this.gbSafeProtect.Text = ResourceCulture.GetString("SafeProText");
            this.chkVoltageMin.Text = ResourceCulture.GetString("VolMinText");
            this.chkVoltageMax.Text = ResourceCulture.GetString("VolMaxText");
            this.chkCurrentMin.Text = ResourceCulture.GetString("CurrMinText");
            this.chkCurrentMax.Text = ResourceCulture.GetString("CurrMaxText");
            this.chkTMax.Text = ResourceCulture.GetString("TempMaxText");
            this.gbHuaChengProtect.Text = ResourceCulture.GetString("BFGSProtectCondition");
            this.chkVoltageChangeRate.Text = ResourceCulture.GetString("BFGSRate");
            this.lblDetectionTime.Text = ResourceCulture.GetString("DetectionTime");
            this.lblVoltageValue.Text = ResourceCulture.GetString("Vol");
            this.gbPlatForm.Text = ResourceCulture.GetString("PlatVolt");
            this.chkPlatForm1.Text = ResourceCulture.GetString("Plat") + " 1";
            this.chkPlatForm2.Text = ResourceCulture.GetString("Plat") + " 2";
            this.chkPlatForm3.Text = ResourceCulture.GetString("Plat") + " 3";
            this.gbDelayProtect.Text = ResourceCulture.GetString("DelayProtect");
            this.chkStepDelay.Text = ResourceCulture.GetString("StepDelay");
            this.chkContinueDelay.Text = ResourceCulture.GetString("ContinueDelay");
            this.chkActiveSubstance.Text = ResourceCulture.GetString("Material");
            this.gbCustomerCurrent.Text = ResourceCulture.GetString("CustomerCurr");
            this.chkCusCur.Text = ResourceCulture.GetString("CusCur");
            this.lblCusCurMin.Text = ResourceCulture.GetString("CusCurLower");
            this.lblCusCurMax.Text = ResourceCulture.GetString("CustCurUpper");
        }
        #endregion
    }
}
